<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href=<%=basePath %>>
<title></title>
<link href="houtai/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="houtai/js/main.js"></script>
<script type="text/javascript">
	function goBack(){
			location.href="NoticeServlet?param=Notice";
		}
function recommend(){

	document.getElementById("recommend").value=<%=request.getAttribute("level")%>;

}
window.onload=recommend;
function neirong(){

	var neirong=document.getElementById("neirong").value;
	var regT=/^\s{0,}$/;//\s空白字符
	if(regT.test(neirong)||neirong==null||neirong.length==0){
		 
		document.getElementById("nei").style.color="red";
		document.getElementById("nei").innerHTML="内容不能是空,请输入内容！";
		
		alert("内容不能为空,请将表填完整!∩_∩");
		return false;
			}	
	document.getElementById("nei").style.color="green";
	document.getElementById("nei").innerHTML="√";
	return true;
	}
function ckbutton(){	
if(confirm("确认提交?")){
document.name.submit();
}
else return false;
alert("提交成功!");
	}
function sub(){
	return neirong()&&ckbutton();
	//return ckbutton()&&neirong();
}		
	
</script>
</head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td style="height:25px; background-color:#f3f3f3; font-weight:bold" valign="top">
    &nbsp;&nbsp;&nbsp;&nbsp;当前位置：
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;soda创业教育平台&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;后台管理&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;soda公告管理</td>
  </tr>
  <tr>
    <td style="height:34px; background-image:url(houtai/images/main_header.gif); border-bottom:1px solid #cfd8e0; padding:0px">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20" height="34"><img src="houtai/images/main_headerL.gif" width="20" height="34"></td>
          <td style="color:#90c8e8;"><img src="houtai/images/icon_card.gif" width="16" height="16" align="absmiddle">&nbsp;&nbsp;
          <strong><a href="NoticeServlet?param=Notice">soda公告管理</a> &nbsp;&nbsp;》》》编辑soda公告</strong></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="100%" valign="top">
    <div style="overflow:auto;height:100%; width:100%">
    <form action="NoticeServlet?param=update&id=${notice.notId}" method="post" onsubmit="return sub()">
   
      <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
        <tr>
        	<td style="text-align:right">标题</td>
            <td><input type="text" name="titleName" style="width:500px" readonly="readonly" value="${notice.notTitle}"></td>
        </tr>
        <tr>
        	<td style="text-align:right">作者</td>
            <td><input type="text" name="admin" value="${sessionScope.user.useLoginName }" readonly="readonly" style="width:500px"></td>
        </tr>
        <tr>
        	<td style="text-align:right">公告级别</td>
            <td>
				<select name="recommend" id="recommend">
					<option value="1">一般</option>
					<option value="2">紧急</option>
					<option value="3">非常紧急</option>
				</select>
			</td>
        </tr>
        <tr>
        	<td style="text-align:right">内容</td>
            <td><textarea rows="15" cols="60"  id="neirong"name="neirong">${notice.notContent}</textarea><span id="nei"></span></td>
        </tr>
        <tr>
        	<td style="text-align:right"></td>
            <td><input type="submit" value="提交"> <input type="button" value="返回" onClick="Javascript:goBack()"></td>
        </tr>
      </table>
     
      </form>
    </div>
  </td>
  </tr>
</table>
</body>
</html>